<?php

namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class User1 extends Model
{
    //必须定义表，必选
    protected $table = 'a';
    //可选
    public $timestamps=false;

    public function Test(){
    
       $int =  $this->insert([
            'name' => '小黑',
            'age' => '3'
       ]);
       return $int;
    }

    public function Test1(){
      
       return $this->get();
    }

    public function Test2(){
      
        return $this->where('id','2')->update(['name' => '345']);
     }

     public function Test3(){
         return $this->where('id','7')->delete();
     }

     public function fenye(){
         return $this->paginate(5);
         //paginate就是分页你要几行分页
     }
}
